package com.endava.spring_ioc.dao;

import java.sql.ResultSet;
import java.util.List;

import com.endava.spring_ioc.beans.Account;

/**
 * Interface used for account basic operations.
 * 
 * @author acojocar
 * @since 26.07.2013
 * @version 1.0
 * 
 */
public interface AccountDao {

	public static final String ACCOUNT_TABLE = "account";
	public static final String SELECT_TABLE = "SELECT * FROM ";

	/**
	 * Returns a result set from data base, with all accounts information.
	 * 
	 * @return result set
	 */
	public ResultSet getAllAccounts();

	/**
	 * Return a list with all accounts.
	 * 
	 * @return list with accounts
	 */
	public List<Account> getAccounts();

	/**
	 * Gets from Data Base the account by ID.
	 * 
	 * @param accountID
	 *            the ID of account
	 * @return the result set from Data Base
	 */
	public ResultSet getAccountByID(Integer accountID);

	/**
	 * Add a new account, with specified parameters.
	 * 
	 * @param accountID
	 *            the account ID
	 * @param accountType
	 *            the type of account
	 * @param amount
	 *            the amount of account
	 */
	public void addAccount(Integer accountID, String accountType, Integer amount);

	/**
	 * Adds a new account to list and return the number of accounts.
	 * 
	 * @param account
	 *            the new account to add.
	 * @return the size of list
	 */
	public int addAccount(Account account);

	/**
	 * Deletes an account from Data Base, by ID.
	 * 
	 * @param accountID
	 *            the ID of account to be deleted.
	 */
	public void deleteAccount(Integer accountID);

}
